<template>
  <div class="winrecord">
    <div class="winrecordHead">
      <span class="winrecordHeadTime">抽奖时间：</span>
      <el-date-picker
        v-model="timeValue"
        type="datetimerange"
        range-separator="-"
        start-placeholder="开始日期"
        end-placeholder="结束日期"
        @change="timeValueChange"
        style="margin-right:20px"
      >
      </el-date-picker>
      <el-input
        placeholder="请输入车牌号"
        suffix-icon="el-icon-search"
        v-model="inputValue"
        style="width:200px"
      >
      </el-input>
    </div>
    <div class="content">
      <div class="contentHead">
        <div>抽奖时间</div>
        <div>车牌号</div>
        <div>抽奖奖品</div>
      </div>
      <div class="contentList">
        <div v-for="(item,index) in contentList" :key="index" class="contentListItem">
            <div>{{item.time}}</div>
            <div>{{item.catCode}}</div>
            <div>{{item.gift}}</div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      timeValue: null, //选择的时间间隔，正确选择后为数组类型
      inputValue: "", //输入的车牌号
      contentList:[
        {
          time:'2020-10-10 09:12:10',
          catCode:"渝B123456",
          gift:"一包纸"
        },
        {
          time:'2020-10-10 09:12:10',
          catCode:"渝B123456",
          gift:"一包纸"
        },
        {
          time:'2020-10-10 09:12:10',
          catCode:"渝B123456",
          gift:"一包纸"
        }
      ]
    };
  },
  methods: {
    //当日期选择的值发生变化触发
    timeValueChange() {
      console.log(this.timeValue);
    },
  },
};
</script>

<style scoped>

.winrecordHead {
  margin: 20px;
}
.winrecordHeadTime {
  display: inline-block;
  margin-right: 20px;
}
.contentHead>div{
  font-size: 18px;
  font-weight: bold;
  width: 33.3%;
  float: left;
  padding: 10px 0 10px 20px;
  background: #523312;
  color: white;
  box-sizing: border-box;
}
.contentListItem>div{
  width: 33.3%;
  float: left;
  padding: 10px 0 10px 20px;
  box-sizing: border-box;
  border-bottom:2px dashed #233232 ;
}
</style>
